package testing;


import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import seperator.QuotationSeperator;
import words.Quotation;

public class QuotationTest {
	private QuotationSeperator quot_sep;
	@Before
	public void setUp() throws Exception {
		quot_sep = new QuotationSeperator();
	}

	@Test
	public void test1()
	{
		String [] qq = {"\"","hi","hi","hi","hi","hi","\""};
		quot_sep.setdata(qq);
		quot_sep.seperate();
		Quotation q = quot_sep.getResult();
		int result = q.getArrayList().size();
		assertEquals(result,1);
	}
	@Test
	public void test2()
	{
		String [] qq = {"ee","hi","hi","hi","hi","hi","ee"};
		quot_sep.setdata(qq);
		quot_sep.seperate();
		Quotation q = quot_sep.getResult();
		int result = q.getArrayList().size();
		assertEquals(result,0);
	}
	@Test
	public void test3()
	{
		String [] qq = {"\"","hi","hi","hi","\"","hi","\"","hi","hi","\""};
		quot_sep.setdata(qq);
		quot_sep.seperate();
		Quotation q = quot_sep.getResult();
		int result = q.getArrayList().size();
		assertEquals(result,2);
	}
}
